// 通知公告
import request from '@/utils/request'

// 通知公告分页列表
export const getNoticePage = (data) => {
  return request({ url: `/xddcloud-psc/psc/notice/page`, method: 'POST', data })
}

// 新增通知公告
export const addNotice = (data) => {
  return request({ url: `/xddcloud-psc/psc/notice/add`, method: 'POST', data })
}

// 修改通知公告
export const updateNotice = (data) => {
  return request({ url: `/xddcloud-psc/psc/notice/update`, method: 'PUT', data })
}

// 发布通知公告
export const publishNotice = (params) => {
  return request({ url: `/xddcloud-psc/psc/notice/publish/${params.id}`, method: 'PUT' })
}

// 撤销通知公告
export const revokeNotice = (params) => {
  return request({ url: `/xddcloud-psc/psc/notice/revoke/${params.id}`, method: 'PUT' })
}

// 通知公告详情
export const getDetailNotice = (params) => {
  return request({ url: `/xddcloud-psc/psc/notice/detail/${params.id}`, method: 'GET' })
}

// 删除公告
export const deltetNotice = (params) => {
  return request({ url: `/xddcloud-psc/psc/notice/logicDel/${params.id}`, method: 'DELETE' })
}
